﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace vsXPathTester.Lib
{
    /// <summary>
    /// All Application Related Configuration are here.
    /// </summary>
    public class AppConf
    {
        /// <summary>
        /// Legal Name of Application
        /// </summary>
        public static string ApplicationName = "vsXPath Tester";
        /// <summary>
        /// Major Version of Application
        /// </summary>
        public static long ApplicationMajorVersion = 2;
        /// <summary>
        /// Minor version of application
        /// </summary>
        public static long ApplicationMinorVersion = 0;
        /// <summary>
        /// Collection of all Windows that are loaded in Application for singleton usage.
        /// </summary>
        public static SortedList<string, System.Windows.Window> ApplicationWindows = new SortedList<string, System.Windows.Window>();

        public static DataTable Plugins = new DataTable();

        public static void AddWindow(string keyname, System.Windows.Window win)
        {
            if (!AppConf.ApplicationWindows.ContainsKey(keyname))
            {
                AppConf.ApplicationWindows.Add(keyname, win);
            }
        }

        public static System.Windows.Window GetWindow(string key)
        {
            if (AppConf.ApplicationWindows.ContainsKey(key))
            {
                return AppConf.ApplicationWindows[key];
            }
            else
            {
                return null;
            }
        }

    }
       
}
